package com.punai.evaluationSystem.incomeDataEvalute.bo;


import cn.hutool.core.collection.CollUtil;
import com.punai.common.core.domain.BaseEntity;
import com.punai.evaluationSystem.incomeDataEvalute.domain.EvaluationDataPriceSr;
import com.punai.externalccb.constants.CCBConstants;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

public class IncomeDataEvaluteBo  extends BaseEntity {
    private String classification;
    private Long companyId;
    private String incentoryType = "G";
    private String idStr;
    private List<IncomeDataEvaluteBo>  saveData = new ArrayList<>();
    private List<EvaluationDataPriceSr>  qdSaveData = new ArrayList<>();

    private String id;
    private String code;
    private String name;
    private String pid;
    private String singleFeeId;//当前选中id
    private String inventoryStandard;//清单规范
    private String projectDept;//项目部门
    private String projectName;//项目名称
    private String address;//地区
    private List<String> addressList;//省市区
    private String priceType;//价格类型
    private String evaluteType;//评价类型
    private String priceNum;//价格数量
    private String categoryId;//树节点 分类id
    private String type;//页签类型
    private String cleanStatus = "清洗数据";//清洗状态
    private String gsxm;//归属项目
    private String timeStart;//开始时间
    private String timeEnd;//结束时间
    private List<String> dateRange;

    private String listCodeSequence;//原始编码
    private String listCode;//清单编码
    private String listName;//清单名称
    private String xmtz;//项目特征
    private String jldw;//计量单位
    private String gznr;//工作内容
    private String jsgz;//计算规则
    private int btjgsl;//不同价格数量
    private int count;//总数量
    private int yycs;//应用次数
    private BigDecimal price;//单价
    private String oid;
    private String proid;
    private String dataJson;//源数据JSON
    private String linkDataJson;//源数据关联的CbFeeItem
    private BigDecimal zhdj;//综合单价
    private BigDecimal lre;//利润额
    private BigDecimal lrl;//利润率
    private String priceRange;//价格区间
    private String priceSource;//价格来源名称
    private String orginCode;
    private String jqAvg;//加权平均值
    private String tabType;

    private List<String> ids = new ArrayList<>();
    private List<String> codes = new ArrayList<>();
    private List<String> oids = new ArrayList<>();
    private List<String> list;

    private Integer pageNum;
    private Integer pageSize;

    public static IncomeDataEvaluteBo convert(IncomeDataEvaluteBo bo){
        if (bo.getInventoryStandard()!=null && bo.getInventoryStandard().equals("全部")){
            bo.setInventoryStandard(null);
        }
        if (bo.getProjectDept()!=null && bo.getProjectDept().equals("全部")){
            bo.setProjectDept(null);
        }
        if (bo.getAddress()!=null && bo.getAddress().equals("全部")){
            bo.setAddress(null);
        }
        if (bo.getPriceType()!=null && bo.getPriceType().equals("全部")){
            bo.setPriceType(null);
        }
        if (bo.getEvaluteType()!=null && bo.getEvaluteType().equals("全部")){
            bo.setEvaluteType(null);
        }
        if (CollUtil.isNotEmpty(bo.getAddressList())){
            StringBuilder str = new StringBuilder();
            for (String address : bo.getAddressList()) {
                str.append(address);
            }
            bo.setAddress(str.toString());
        }
        return bo;
    }

    public String getClassification() {
        return classification;
    }

    public void setClassification(String classification) {
        this.classification = classification;
    }

    public String getSingleFeeId() {
        return singleFeeId;
    }

    public void setSingleFeeId(String singleFeeId) {
        this.singleFeeId = singleFeeId;
    }

    public String getIdStr() {
        return idStr;
    }

    public void setIdStr(String idStr) {
        this.idStr = idStr;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public List<String> getIds() {
        return ids;
    }

    public void setIds(List<String> ids) {
        this.ids = ids;
    }

    public List<String> getCodes() {
        return codes;
    }

    public void setCodes(List<String> codes) {
        this.codes = codes;
    }

    public String getIncentoryType() {
        return incentoryType;
    }

    public void setIncentoryType(String incentoryType) {
        this.incentoryType = incentoryType;
    }

    public Long getCompanyId() {
        return companyId;
    }

    public void setCompanyId(Long companyId) {this.companyId = companyId;}

    public String getInventoryStandard() {return inventoryStandard;}

    public void setInventoryStandard(String inventoryStandard) {
        this.inventoryStandard = inventoryStandard;
    }

    public String getProjectDept() {
        return projectDept;
    }

    public void setProjectDept(String projectDept) {
        this.projectDept = projectDept;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getPriceType() {return priceType;}

    public void setPriceType(String priceType) {
        this.priceType = priceType;
    }

    public String getEvaluteType() {
        return evaluteType;
    }

    public void setEvaluteType(String evaluteType) {
        this.evaluteType = evaluteType;
    }

    public String getPriceNum() {
        return priceNum;
    }

    public void setPriceNum(String priceNum) {
        this.priceNum = priceNum;
    }

    public String getListCode() {
        return listCode;
    }

    public void setListCode(String listCode) {
        this.listCode = listCode;
    }

    public String getListName() {
        return listName;
    }

    public void setListName(String listName) {
        this.listName = listName;
    }

    public String getXmtz() {
        return xmtz;
    }

    public void setXmtz(String xmtz) {
        this.xmtz = xmtz;
    }

    public String getJldw() {
        return jldw;
    }

    public void setJldw(String jldw) {
        this.jldw = jldw;
    }

    public int getBtjgsl() {
        return btjgsl;
    }

    public void setBtjgsl(int btjgsl) {
        this.btjgsl = btjgsl;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public String getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(String categoryId) {
        this.categoryId = categoryId;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getCleanStatus() {
        return cleanStatus;
    }

    public void setCleanStatus(String cleanStatus) {
        this.cleanStatus = cleanStatus;
    }

    public String getGznr() {
        return gznr;
    }

    public void setGznr(String gznr) {
        this.gznr = gznr;
    }

    public String getJsgz() {
        return jsgz;
    }

    public void setJsgz(String jsgz) {
        this.jsgz = jsgz;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public String getOid() {
        return oid;
    }

    public void setOid(String oid) {
        this.oid = oid;
    }

    public String getProid() {
        return proid;
    }

    public void setProid(String proid) {
        this.proid = proid;
    }

    public String getDataJson() {
        return dataJson;
    }

    public void setDataJson(String dataJson) {
        this.dataJson = dataJson;
    }

    public String getLinkDataJson() {
        return linkDataJson;
    }

    public void setLinkDataJson(String linkDataJson) {
        this.linkDataJson = linkDataJson;
    }

    public BigDecimal getZhdj() {
        return zhdj;
    }

    public void setZhdj(BigDecimal zhdj) {
        this.zhdj = zhdj;
    }

    public BigDecimal getLre() {
        return lre;
    }

    public void setLre(BigDecimal lre) {
        this.lre = lre;
    }

    public BigDecimal getLrl() {
        return lrl;
    }

    public void setLrl(BigDecimal lrl) {
        this.lrl = lrl;
    }

    public String getPriceRange() {
        return priceRange;
    }

    public void setPriceRange(String priceRange) {
        this.priceRange = priceRange;
    }

    public String getGsxm() {
        return gsxm;
    }

    public void setGsxm(String gsxm) {
        this.gsxm = gsxm;
    }

    public String getProjectName() {
        return projectName;
    }

    public void setProjectName(String projectName) {
        this.projectName = projectName;
    }

    public String getListCodeSequence() {
        return listCodeSequence;
    }

    public void setListCodeSequence(String listCodeSequence) {
        this.listCodeSequence = listCodeSequence;
    }

    public String getPriceSource() {
        return CCBConstants.CCB_TYPE.getDescByCode(getPriceType());
    }

    public void setPriceSource(String priceSource) {
        this.priceSource = priceSource;
    }

    public List<String> getOids() {
        return oids;
    }

    public void setOids(List<String> oids) {
        this.oids = oids;
    }

    public List<IncomeDataEvaluteBo> getSaveData() {
        return saveData;
    }

    public void setSaveData(List<IncomeDataEvaluteBo> saveData) {
        this.saveData = saveData;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getOrginCode() {
        return orginCode;
    }

    public void setOrginCode(String orginCode) {
        this.orginCode = orginCode;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getPid() {
        return pid;
    }

    public void setPid(String pid) {
        this.pid = pid;
    }

    public String getTimeStart() {
        return timeStart;
    }

    public void setTimeStart(String timeStart) {
        this.timeStart = timeStart;
    }

    public String getTimeEnd() {
        return timeEnd;
    }

    public void setTimeEnd(String timeEnd) {
        this.timeEnd = timeEnd;
    }

    public List<String> getDateRange() {
        return dateRange;
    }

    public void setDateRange(List<String> dateRange) {
        this.dateRange = dateRange;
    }

    public List<String> getList() {
        return list;
    }

    public void setList(List<String> list) {
        this.list = list;
    }

    public List<String> getAddressList() {
        return addressList;
    }

    public void setAddressList(List<String> addressList) {
        this.addressList = addressList;
    }

    public int getYycs() {
        return yycs;
    }

    public void setYycs(int yycs) {
        this.yycs = yycs;
    }

    public String getJqAvg() {
        return jqAvg;
    }

    public void setJqAvg(String jqAvg) {
        this.jqAvg = jqAvg;
    }

    public List<EvaluationDataPriceSr> getQdSaveData() {
        return qdSaveData;
    }

    public void setQdSaveData(List<EvaluationDataPriceSr> qdSaveData) {
        this.qdSaveData = qdSaveData;
    }

    public String getTabType() {
        return tabType;
    }

    public void setTabType(String tabType) {
        this.tabType = tabType;
    }

    public Integer getPageNum() {
        return pageNum;
    }

    public void setPageNum(Integer pageNum) {
        this.pageNum = pageNum;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }
}
